import request from '@/utils/request'
// 查询预约列表
export function listReservation (query) {
    return request({
        url: '/web/reservation/list',
        method: 'get',
        params: query
    })
}

// 查询预约详细
export function getReservation (id) {
    return request({
        url: '/web/reservation/' + id,
        method: 'get'
    })
}

// 新增预约
export function addReservation (data) {
    return request({
        url: '/web/reservation',
        method: 'post',
        data: data
    })
}

// 修改预约
export function updateReservation (data) {
    return request({
        url: '/web/reservation',
        method: 'put',
        data: data
    })
}

// 审核
export function upStateReservation (data) {
    return request({
        url: '/web/reservation/upState',
        method: 'PUT',
        data
    })
}


// 删除预约
export function delReservation (id) {
    return request({
        url: '/web/reservation/' + id,
        method: 'delete'
    })
}

// 查询接待人下拉
export function getSelectAPI (query) {
    return request({
        url: '/wx/system/user/reception-select',
        method: 'get',
    })
}

// 查询接待人下拉
export function exportAPI (query) {
    return request({
        url: '/web/reservation/export',
        method: 'POST',
    })
}

// 通过预约表id获取对应的调查问卷
export function selQuestionnaireByReservationIdAPI (id) {
    return request({
        url: '/web/questionnaire/selQuestionnaireByReservationId/' + id,
        method: 'GET',
    })
}